package com.example.xm.controller;

import com.example.xm.Entity.Kg;
import com.example.xm.servive.KgServive;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/K")
public class KgController {

    @Autowired
    KgServive kgServive;

    @GetMapping("/kg")
    public List<Kg> getAllKg(){
        return kgServive.getAllKg();
    }
}
